#include<stdio.h>
main()
{
	int i=1;
	double sum=0;
	while ((1.0/i)>=1.0e-5)
    {
	    if(i%2)
			 sum+=1.0/i;
		else
			 sum-=1.0/i;
		i++;
	}
	printf("sum=%f\n",sum);
	return 0;
}	